<?php use yii\helpers\url;?>
<style>
	li{
		display: inline-block;
	}
</style>
<div style="float: right;margin: 10px 0px;">
	<a class="btn btn-primary" href="<?php echo \yii\helpers\Url::to(['add']);?>">添加</a>
</div>
<div>
	<table class="table table-hover">
		<tr>
			<th>题目</th>
			<th>简介</th>
			<th>内容</th>
			<th>标示</th>
			<th>浏览次数</th>
			<th>状态</th>
			<th>操作</th>
		<?php
		foreach ($data as $value) {
			echo "<tr>";
			echo "<td>".$value['title']."</td>";
			echo "<td>".$value['description']."</td>";
			echo "<td>".$value['content']."</td>";
			echo "<td>".$value['flag']."</td>";
			echo "<td>".$value['count']."</td>";
			echo "<td>".$value['status']."</td>";
			echo "<td><a href=".url::to(["edit","id"=>$value['id']]).">修改</a>|<a href=".url::to(['delete']).">删除</a></td>";
			echo "</tr>";
		}
		?>
	</table>
	<?php echo "<div style='float:right;'>".$widget."</div>";?>
</div>